import Vue from 'vue'
import Vuex from 'vuex'

// 导入提取的getters文件
import getters from './getters'

// 导入模块
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'

// 将vuex挂载为vue的插件
Vue.use(Vuex)

const store = new Vuex.Store({
  // 挂载拆分的模块
  modules: {
    app,
    settings,
    user
  },
  // 类似于vue的computed
  getters
})

export default store
